.class Lcom/melesta/engine/EngineActivity$24;
.super Ljava/lang/Object;
.source "EngineActivity.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/melesta/engine/EngineActivity;->sponsorPaySaveCoins(D)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/melesta/engine/EngineActivity;

.field final synthetic val$coins:I

.field final synthetic val$sharedPreferences:Landroid/content/SharedPreferences;


# direct methods
.method constructor <init>(Lcom/melesta/engine/EngineActivity;ILandroid/content/SharedPreferences;)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 2187
    iput-object p1, p0, Lcom/melesta/engine/EngineActivity$24;->this$0:Lcom/melesta/engine/EngineActivity;

    iput p2, p0, Lcom/melesta/engine/EngineActivity$24;->val$coins:I

    iput-object p3, p0, Lcom/melesta/engine/EngineActivity$24;->val$sharedPreferences:Landroid/content/SharedPreferences;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 7

    .prologue
    .line 2190
    iget v1, p0, Lcom/melesta/engine/EngineActivity$24;->val$coins:I

    invoke-static {v1}, Lcom/melesta/engine/sponsorpay/SPNativeDelegate;->OnEarnPoints(I)Z

    move-result v0

    .line 2191
    .local v0, spendPoints:Z
    const-string v1, "engine"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "[SponsorPayDelegate] Update points: "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget v3, p0, Lcom/melesta/engine/EngineActivity$24;->val$coins:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 2193
    if-eqz v0, :cond_0

    .line 2194
    iget-object v1, p0, Lcom/melesta/engine/EngineActivity$24;->this$0:Lcom/melesta/engine/EngineActivity;

    const-string v2, "SponsorPayCoins"

    iget-object v3, p0, Lcom/melesta/engine/EngineActivity$24;->val$sharedPreferences:Landroid/content/SharedPreferences;

    const-string v4, "SponsorPayCoins"

    const-wide/16 v5, 0x0

    invoke-interface {v3, v4, v5, v6}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J

    move-result-wide v3

    long-to-int v3, v3

    iget v4, p0, Lcom/melesta/engine/EngineActivity$24;->val$coins:I

    sub-int/2addr v3, v4

    int-to-long v3, v3

    #calls: Lcom/melesta/engine/EngineActivity;->savePreference(Ljava/lang/String;J)V
    invoke-static {v1, v2, v3, v4}, Lcom/melesta/engine/EngineActivity;->access$1500(Lcom/melesta/engine/EngineActivity;Ljava/lang/String;J)V

    .line 2196
    :cond_0
    return-void
.end method
